Skip to content

Conversation

@shivam2680
Copy link
Contributor

@shivam2680 shivam2680 commented Feb 18, 2025

Description

This PR adds userAgentHeader option in connect call, so users can configure the user agent string generated.
Note: clientId arg in connect options is renamed to userAgentHeader. The clientId in OAuthManager options exists and corresponds to the Databricks Service Principal clientId.

Testing

unit tests

port?: number;
path: string;
clientId?: string;
userAgentHeader?: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The only thing I'd change - maybe use userAgentEntry, like in Python connector

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

// Example:
// - NodejsDatabricksSqlConnector/0.1.8-beta.1 (Node.js 16.13.1; Darwin 21.5.0)
// UserAgent ::= <ProductName> '/' <ProductVersion> '(' <Comment> ')'
// ProductName ::= 'NodejsDatabricksSqlConnector'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit : include the where in comment

@shivam2680 shivam2680 merged commit 538bf7a into main Feb 20, 2025
7 of 8 checks passed
@shivam2680 shivam2680 deleted the shivam2680/user-agent-header branch March 28, 2025 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants